package org.example.stdent.test;

import org.apache.ibatis.session.SqlSession;

import java.io.IOException;
import java.util.List;


import org.example.stdent.entity.Student;
import org.example.stdent.mapper.studentmapper;
import org.example.stdent.sqlsessionutil.sqlsessionutil;

public class test {
    public static void main(String[] args) throws IOException {
        //通过实现类来 完成sql语句
       // lmpl lmpl = new lmpl();
        /*student student = lmpl.selectStudent(1);
        System.out.println(student);*/
        /*student student = new student(1, "萧炎", 23, "男");
        lmpl.insertStudent(student);*/
       /* List<student> students = lmpl.selectAllStudent();
        students.forEach(System.out::println);*/
        /*student student = new student(1, "男", 23, "李星云");
        lmpl.updateStudent(student);*/
       // lmpl.deleteStudent(1);



        SqlSession session = sqlsessionutil.getSqlSession();
        studentmapper mapper = session.getMapper(studentmapper.class);
        Student student = mapper.selectOne(1);
        System.out.println(student);


    }
}
